home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / AIAT / Examples / Sources / RamStoreStream / RamStoreStream.h < prev   
Encoding:
Text File  |  1998-04-16  |  918 b   |  44 lines  |  [TEXT/CWIE]

  1. // RamStoreStream.h
  2. //    Copyright:    © 1994 - 1998 by Apple Computer, Inc., all rights reserved.
  3.  
  4.  
  5. #pragma once
  6. #include "IAStoreStream.h"
  7. #include <stdio.h>
  8. class LHandleStream;
  9.  
  10. class RamStoreStream : public IAStoreStream
  11. {
  12.     public:
  13.                 RamStoreStream(LHandleStream* _myStream);
  14. //                RamStoreStream(RamStoreStream& s) : IAStoreStream(s) {}
  15.                 ~RamStoreStream();
  16.     
  17.         void    Initialize();
  18.         void    Open(bool writeable);
  19.         bool    IsOpen();
  20.         void    Flush();
  21.     
  22.         uint32    GetEOF();
  23.         void    SetEOF(uint32 address);
  24.         
  25.         virtual bool             IsWritable( void );
  26.         virtual IAStoreStream*     Clone( void );
  27.  
  28.     protected:
  29.         void    Write(uint32 address, const byte* data, uint32 length);
  30.         uint32    Read(uint32 address, byte* data,  uint32 length);
  31.         bool    am_open;
  32.     
  33.     private:
  34.         LHandleStream* myStream;
  35.         
  36.         //char*            fileName;    // used just for identification when debugging
  37.     
  38.         // OS-specific methods
  39.         //void                SetFileType(char* filename);
  40. };
  41.  
  42.  
  43.  
  44.